﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;

namespace Bzure.Apps.Security.ViewModels
{
    public class ChangePasswordModel
    {
        [Required]
        [DataType(DataType.Password)]
        [Display(Name = "旧密码")]
        public string OldPassword { get; set; }

        [Required]
        [DataType(DataType.Password)]
        [Display(Name = "新密码")]
        public string NewPassword { get; set; }

        [DataType(DataType.Password)]
        [Display(Name = "确认新密码")]
        [Compare("新密码", ErrorMessage = "新密码输入不一致")]
        public string ConfirmPassword { get; set; }
    }
    public class ChangePasswordViewModel : IPageViewModel
    {
        public ChangePasswordViewModel()
        {
            this.Title = string.Empty;
            this.Message = string.Empty;
            this.ChangePasswordModel = new ChangePasswordModel();
        }
        public string Title { get; set; }
        public string Message { get; set; }
        public string UserName { get; set; }
        public ChangePasswordModel ChangePasswordModel { get; set; }
        public MasterViewModel MasterViewModel { get; set; }
    }
}
